home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / sys / core.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-02  |  1.6 KB  |  52 lines

  1. /*    @(#)core.h 1.16 88/02/08 SMI    */
  2.  
  3. /*
  4.  * Copyright (c) 1987 by Sun Microsystems, Inc.
  5.  */
  6.  
  7. #ifndef _CORE_
  8. #define _CORE_
  9.  
  10. #include <sys/exec.h>
  11. #include <machine/reg.h>
  12.  
  13. #define CORE_MAGIC    0x080456
  14. #define CORE_NAMELEN    16        /* Related to MAXCOMLEN in user.h */
  15.  
  16. #if defined(sun2) || defined(sun3)
  17. /*
  18.  * The size of struct fpa_regs is changed from 141 ints in 3.0 to
  19.  * 77 ints in 3.x.  A pad of this size difference is added to struct core.
  20.  */
  21. #define CORE_PADLEN    64
  22. #endif
  23.  
  24. /*
  25.  * Format of the beginning of a `new' core file.
  26.  * The `old' core file consisted of dumping the u area.
  27.  * In the `new' core format, this structure is followed
  28.  * copies of the data and  stack segments.  Finally the user
  29.  * struct is dumped at the end of the core file for programs
  30.  * which really need to know this kind of stuff.  The length
  31.  * of this struct in the core file can be found in the
  32.  * c_len field.  When struct core is changed, c_fpstatus
  33.  * and c_fparegs should start at long word boundaries (to
  34.  * make the floating pointing signal handler run more efficiently).
  35.  */
  36. struct core {
  37.     int    c_magic;        /* Corefile magic number */
  38.     int    c_len;            /* Sizeof (struct core) */
  39.     struct    regs c_regs;        /* General purpose registers */
  40.     struct     exec c_aouthdr;        /* A.out header */
  41.     int    c_signo;        /* Killing signal, if any */
  42.     int    c_tsize;        /* Text size (bytes) */
  43.     int    c_dsize;        /* Data size (bytes) */
  44.     int    c_ssize;        /* Stack size (bytes) */
  45.     char    c_cmdname[CORE_NAMELEN + 1]; /* Command name */
  46. #ifdef FPU
  47.     struct    fpu c_fpu;        /* external FPU state */
  48. #endif
  49.     int    c_ucode;        /* Exception no. from u_code */
  50. };
  51. #endif !_CORE_
  52.